/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.pay.j;

import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import com.qihoo.gamecenter.sdk.common.i.i;
import com.qihoo.gamecenter.sdk.common.i.s;
import com.qihoo.gamecenter.sdk.pay.k.g;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeMap;
import org.apache.http.message.BasicNameValuePair;

public class t extends com.qihoo.gamecenter.sdk.common.h.a {
    private com.qihoo.gamecenter.sdk.common.c.a f;

    public t(Context paramContext, Intent paramIntent) {
        super(paramContext, paramIntent);
        this.f = com.qihoo.gamecenter.sdk.common.c.a.a(paramContext);
    }

    protected String a(String[] paramArrayOfString) {
        String[] arrayOfString = com.qihoo.gamecenter.sdk.common.a.c.g();
        HashMap localHashMap = new HashMap();
        if (!(TextUtils.isEmpty(arrayOfString[0])))
            localHashMap.put("Q", arrayOfString[0].substring(2));
        if (!(TextUtils.isEmpty(arrayOfString[1])))
            localHashMap.put("T", arrayOfString[1].substring(2));
        String str1 = i.a(localHashMap);
        com.qihoo.gamecenter.sdk.pay.k.c.a("QiHooCoinOrderTask", new Object[] { "The QT cookie str = ", str1 });
        str1 = com.qihoo.gamecenter.sdk.common.f.b.a().a(str1);
        TreeMap localTreeMap = new TreeMap();
        localTreeMap.put("access_token", this.c.getStringExtra("access_token"));
        localTreeMap.put("amount", this.c.getStringExtra("pay_amount"));
        localTreeMap.put("app_ext1", this.c.getStringExtra("app_ext_1"));
        localTreeMap.put("app_ext2", this.c.getStringExtra("app_ext_2"));
        localTreeMap.put("app_key", s.r(this.b));
        localTreeMap.put("app_order_id", this.c.getStringExtra("app_order_id"));
        localTreeMap.put("app_uid", this.c.getStringExtra("app_user_id"));
        localTreeMap.put("app_uname", this.c.getStringExtra("app_user_name"));
        localTreeMap.put("bank_code", "MOBILE_QCOIN");
        localTreeMap.put("notify_uri", this.c.getStringExtra("notify_uri"));
        localTreeMap.put("platform_id", "2");
        localTreeMap.put("pay_mode", "21");
        localTreeMap.put("product_id", this.c.getStringExtra("product_id"));
        localTreeMap.put("product_name", this.c.getStringExtra("product_name"));
        localTreeMap.put("sign_type", "md5");
        localTreeMap.put("user_id", this.c.getStringExtra("qihoo_user_id"));
        localTreeMap.put("src", s.u(this.b));
        localTreeMap.put("sign_attr", "1");
        localTreeMap.put("pay_info1", str1);
        String str2 = com.qihoo.gamecenter.sdk.pay.e.b.a(this.b);
        if (!(TextUtils.isEmpty(str2)))
            localTreeMap.put("quick_info", str2);
        String str3 = com.qihoo.gamecenter.sdk.pay.e.b.b(this.b);
        if (!(TextUtils.isEmpty(str3)))
            localTreeMap.put("risk_control", str3);
        localTreeMap.put("st", g.a("1"));
        s.a(localTreeMap, s.s(this.b));
        ArrayList localArrayList = new ArrayList();
        Iterator localIterator = localTreeMap.entrySet().iterator();
        while (localIterator.hasNext()) {
            Map.Entry localEntry = (Map.Entry) localIterator.next();
            if (localEntry != null) {
                com.qihoo.gamecenter.sdk.pay.k.c.a("QiHooCoinOrderTask", new Object[] { localEntry.getKey(), "=",
                        localEntry.getValue() });
                localArrayList
                        .add(new BasicNameValuePair((String) localEntry.getKey(), (String) localEntry.getValue()));
            }
        }
        return this.f.a("https://mgame.360.cn/internal/mobile_pay.json?", localArrayList);
    }
}